package Test.designmodel.builder;

/**
 * @Title: ecology-idea
 * @Company: 泛微软件
 * @author: weaver.Dusongsong
 * @version: 1.0
 * @CreateDate: 2022-06-09
 * @Description: 指挥者：调用建造者中的方法完成复杂对象的创建。
 * @ModifyLog:
 **/

public class Director {
    private Builder builder;

    public Director(Builder builder){
        this.builder = builder;
    }
    public Product construct(){
        builder.buildPartA();
        builder.buildPartB();
        builder.buildPartC();
        return builder.getResult();
    }
}
